#include<bits/stdc++.h>
using namespace std;

int main()
{
int a,b;
    cin>>a>>b;

    int cnt=0,sum=0;
    for(int i=a;i<=b;i++)
    {
            printf("%5d",i);
        cnt++ ;
        sum+=i;
        if(cnt==5)
        {
        	if(i==b)break;
            cnt=0;
            cout<<endl;
        }
    }cout<<endl<<"sum = "<<sum;
    return 0;
 } 
 
 #include<bits/stdc++.h>
using namespace std;

int main()
{
int a,b;
    cin>>a>>b;

    int cnt=0,sum=0;
    for(int i=a;i<=b;i++)
    {
            printf("%5d",i);
        cnt++ ;
        sum+=i;
        if(cnt==5)
        {
//        	if(i==b)break;
            cnt=0;
            cout<<endl;
        }
    }
	if(cnt!=0)cout<<endl;
	cout<<"Sum = "<<sum;
    return 0;
 } 
